<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css3选择器</title>
  <style>

     ul  li:first-child{
         color: red;
      }

     ul li:last-child{
          color: aquamarine;
      }

     ul li:nth-child(2){
         background-color: #4e6ef2;
      }

     /*ol li:nth-child(2n+1){*/
     /*   background-color: aquamarine;*/
     /*}*/

     /*ol li:nth-child(2n){*/
     /*  background-color: #acbac3;*/
     /*}*/

     ol li:nth-child(odd){
        background-color: blue;
     }

     ol li:nth-child(even){
       background-color: #9e9eb2;
     }


  </style>
</head>
<body>


       <ul>
         <li>item1</li>
         <li>item2</li>
         <li>item3</li>
         <li>item4</li>
       </ul>

       <ol>
         <li>item1</li>
         <li>item2</li>
         <li>item3</li>
         <li>item4</li>
       </ol>

</body>
</html>